<script>
    /*
     * @description: 按照-前的数字比较大小
     * @fileName: 比较字符串大小.html 
     * @author: DangPeng
     * @date: 2024-02-22 14:23:31 
    */
    var s1 = "1-22-33-44-55", s2 = "1-22-33-44-55";
    //生成一个迭代器,每次取出一个数字
    var reg = /\d+/g;
    var arr1 = s1.match(reg);
    var arr2 = s2.match(reg);
    console.log(arr1);
    console.log(arr2);


</script>